package com.wangzhixuan.commons.utils.excel;

import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;

public class JpPersonEntity implements java.io.Serializable {
	/**id*/
	private java.lang.String id;
	/**年龄*/
	@Excel(exportName="年龄", exportConvertSign = 0, exportFieldWidth = 10, importConvertSign = 0)
	private java.lang.Integer age;
			/**生日*/
	@Excel(exportName="生日", exportConvertSign = 1, exportFieldWidth = 30, importConvertSign = 0)
	private java.util.Date birthday;
	/**出生日期*/
	@Excel(exportName="出生日期", exportConvertSign = 1, exportFieldWidth = 30, importConvertSign = 0)
	private java.util.Date createdt;
			/**用户名*/
	@Excel(exportName="用户名", exportConvertSign = 0, exportFieldWidth = 20, importConvertSign = 0)
	private java.lang.String name;
	/**工资*/
	@Excel(exportName="工资", exportConvertSign = 0, exportFieldWidth = 10, importConvertSign = 0)
	private BigDecimal salary;
	
		//add-begin--Author:Quainty  Date:20130524 for：[8]excel导出时间问题
	static DateFormat dateFormaterCreatedt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	static DateFormat dateFormaterBirthday = new SimpleDateFormat("yyyy-MM-dd");
	public String getCreatedtConvert() {
		if (this.createdt != null) {
			return dateFormaterCreatedt.format(getCreatedt());
		} else
			return "";
	}
	public void setCreatedtConvert(String createdt) {
		if (createdt != null) {
			try {
				this.createdt = dateFormaterCreatedt.parse(createdt);
			} catch (ParseException e) {
				e.printStackTrace();
			}
		}
	}
	public String getBirthdayConvert() {
		if (this.birthday != null) {
			return dateFormaterBirthday.format(getCreatedt());
		} else
			return "";
	}
	public void setBirthdayConvert(String birthday) {
		if (birthday != null) {
			try {
				this.birthday = dateFormaterBirthday.parse(birthday);
			} catch (ParseException e) {
				e.printStackTrace();
			}
		}
	}
	public java.lang.String getId() {
		return id;
	}
	public void setId(java.lang.String id) {
		this.id = id;
	}
	public java.lang.Integer getAge() {
		return age;
	}
	public void setAge(java.lang.Integer age) {
		this.age = age;
	}
	public java.util.Date getBirthday() {
		return birthday;
	}
	public void setBirthday(java.util.Date birthday) {
		this.birthday = birthday;
	}
	public java.util.Date getCreatedt() {
		return createdt;
	}
	public void setCreatedt(java.util.Date createdt) {
		this.createdt = createdt;
	}
	public java.lang.String getName() {
		return name;
	}
	public void setName(java.lang.String name) {
		this.name = name;
	}
	public BigDecimal getSalary() {
		return salary;
	}
	public void setSalary(BigDecimal salary) {
		this.salary = salary;
	}

}
